package com.study.talk.entity;




import com.study.talk.entity.vo.UserInfoVo;

import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * <p>
 * 
 * </p>
 *
 * @author thor
 * @since 2023-12-18
 */
public class UserInfo implements Serializable {

    

      //("用户id")
   
    private Integer id;

      //("用户名")
    private String username;

      //("用户昵称")
    private String nickName;

      //("用户性别")
    private Integer gender;

      //("用户邮箱")
    private String email;

      //("用户头像地址")
    private String avatar;

      //("用户生日")
    private String birth;

      //("用户住址")
    private String address;

      //("用户简介")
    private String introduce;

      //("用户主页背景图片地址")
    private String bgImg;

      //("用户点赞数")
    private Integer likeCount;

      //("用户手机号")
    private String phone;

    //("创建时间")
    private String createTime;

    public UserInfo(UserInfoVo user) {
        this.id = user.getUserId();
        this.username = user.getUsername();
        this.email = user.getEmail();
        this.nickName = user.getNickName();
        this.phone = user.getPhone();
        this.gender = user.getGender();
        this.introduce = user.getIntroduce();
        this.likeCount = 0;
        this.avatar = user.getAvatar();
        this.birth = user.getBirth();
        this.address = user.getAddress();
        this.bgImg = user.getBgImg();
    }

    public UserInfo() {
    }

    public UserInfo(Integer id, String username, String nickName, Integer gender, String email, String avatar, String birth, String address, String introduce, String bgImg, Integer likeCount, String phone, String createTime) {
        this.id = id;
        this.username = username;
        this.nickName = nickName;
        this.gender = gender;
        this.email = email;
        this.avatar = avatar;
        this.birth = birth;
        this.address = address;
        this.introduce = introduce;
        this.bgImg = bgImg;
        this.likeCount = likeCount;
        this.phone = phone;
        this.createTime = createTime.replaceAll("T"," ");
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public Integer getGender() {
        return gender;
    }

    public void setGender(Integer gender) {
        this.gender = gender;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getIntroduce() {
        return introduce;
    }

    public void setIntroduce(String introduce) {
        this.introduce = introduce;
    }

    public String getBgImg() {
        return bgImg;
    }

    public void setBgImg(String bgImg) {
        this.bgImg = bgImg;
    }

    public Integer getLikeCount() {
        return likeCount;
    }

    public void setLikeCount(Integer likeCount) {
        this.likeCount = likeCount;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime.replaceAll("T"," ");
    }
}
